<template>
    <el-container style="height:800px;border: 1px solid #eee">
        <el-header>
            <Header></Header>
        </el-header>
        <el-container>
            <el-container>
                <el-aside width="250px">
                    <Aside></Aside>
                </el-aside>
                <!--          更换子组件         -->
                <el-main>
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </el-container>
</template>
<script>
    import Header from "@/components/Header"
    import Aside from "@/components/Aside"

    export default {
        name: 'Templates',
        components: {
            Header,
            Aside,
        },
        methods:{
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            }
        },
        data(){
            return{
                totals: 45,
                page:{
                    pageSize:10,
                    currentPage:1,
                },
            };
        }
    }
</script>
<style>
    .el-header, .el-footer {
        background-color: #b3d1d1;
        color: #333;
        text-align: center;
        line-height: 60px;
    }

    .el-aside {
        background-color: #D3DCE6;
        color: #333;
        text-align: center;
        line-height: 200px;
    }

    .el-main {
        background-color: #E9EEF3;
        color: #333;
        text-align: center;
        line-height: 160px;
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }
</style>